Constrained placement

Hi,

I want to create a "folder browser" based on the methods shown in another post.
I create a field and a button but cannot get these elements to react to resizing in the same way that DBE fileName() does i.e. if the dialog box is resized I want the combined field and button to resize to the new window, but the button must not resize. If I attach the right side of the button to "form" the the button size increases to fill the window width. Any ideas ?

void doBrowse(DBE dbe){ // Get the folder
}
     
DB dbMain  = create( "Window wide element" , styleStandard)
   
DBE dbeFieldFolder  = field( dbMain, "My DBE", "folderName", 30, false )
// DBE dbeBrowseButton = button(dbMain, "Browse...", doBrowse)
 
DBE dbeBrowseButton = button(dbMain, "Browse...", doBrowse )
 
dbeFieldFolder->"top"->"form"
dbeFieldFolder->"left"->"form"
dbeFieldFolder->"right"->"unattached"
dbeFieldFolder->"bottom"->"unattached"
 
dbeBrowseButton->"top"->"aligned"->dbeFieldFolder
dbeBrowseButton->"right"->"unattached" 
// dbeBrowseButton->"right"->"form"  // browser stretched on box resize
dbeBrowseButton->"left"->"spaced"->dbeFieldFolder
 
below( dbMain )
// Want the above to react to resizing as this standard dbe
DBE dbeFileName = fileName( dbMain, "Standard fileName", "inputFile.txt" )
 
show dbMain

 


Thanks,Paul

 


SystemAdmin - Thu Sep 01 03:07:49 EDT 2011

Re: Constrained placement
Mathias Mamsch - Thu Sep 01 04:59:50 EDT 2011

You can control resizing using:
 

...
realize dbMain
setExtraWidthShare(dbeFieldFolder, 1.0) 
show dbMain

 


Regards, Mathias

 

 


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

 

Re: Constrained placement
SystemAdmin - Thu Sep 01 06:48:30 EDT 2011

Thanks Mathias, that did the trick

Regards, Paul